<template>
    <div class="mr-content">
      <hpeade>
         <a class="s">{{$route.params.name}}</a> 
      </hpeade>
      <div class="content">
         
          <h2>{{tit.title}}</h2>
          <p class="title"><span>发布：{{tit.author}}</span> <span>时间：{{tit.createTime}}</span></p>
          
      </div>
      <div class="maincontent" v-html="tit.contentValue">

          </div>
    </div>
      
</template>
<script>
    import Hpeade from '../components/Head'
    export default{
        components:{
            Hpeade
        },
        data(){
         return{
          tit:{}
         }
        },
        created(){
           this.axios.get(`https://api.maimengjun.com/index.php?r=message/detail&id=${this.$route.params.id}&withContent=0&withPraise=0`)
           .then(data=>{
               this.tit=data.data.results
               console.log(this.tit)
           })
           .catch(err=>{

           })
        }
    }
</script>
<style scoped>
.content{
    margin-top: 1.5rem;
}
.content>h2{
    width:7rem;
    margin: 0 auto;
}
.maincontent{
    width: 93%;
    margin: 0 auto;
}
.title{
    margin-left: 1.5rem;
    margin-top: 0.3rem;
}
.title>span{
    color: #ccc;
}
    .s{
        display: inline-block;
        position: relative;
        left:1.5rem;
        top: 0.2rem;
        font-size: 0.4rem;
          color: #ff4f65;
        font-weight: bolder;
        width:3rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
       
    }
 
   
</style>